import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Order from '../views/Order.vue'
import Main from '../views/Main.vue'
import Mine from '../views/Mine.vue'
import ShopCard from '../views/ShopCard.vue'
Vue.use(VueRouter)

const routes = [
	{
		path: '/',
		name: 'Login',
		component: Login,
	},
	{
		path: '/home',
		name: 'Home',
		component: Home,
		children:[
			{
				path: '/home',
				name: 'Main',
				component: Main,
			},
			{
				path: '/home/shopcard',
				name: 'ShopCard',
				component: ShopCard,
			},
			{
				path: '/home/order',
				name: 'Order',
				component: Order,
			},
			{
				path: '/home/mine',
				name: 'Mine',
				component: Mine,
			}
		]
	},
]

const router = new VueRouter({
	routes
})

export default router
